<?php

namespace addons\qingdongams\model;

use think\Model;
use traits\model\SoftDelete;

/**
 *
 */
class EventNeeds Extends Model {
	// 开启自动写入时间戳字段
	protected $autoWriteTimestamp = 'int';
	// 定义时间戳字段名
	protected $createTime = 'createtime';
	protected $updateTime = 'updatetime';


    protected $name = 'qingdongams_event_needs';
	public function staff() {
		return $this->hasOne(Staff::class, 'id', 'create_staff_id')->field('id,name,num,img');
	}

    public function getCreatetimeAttr($value)
    {
        return date('Y-m-d H:i', $value);
    }
}
